<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>申办食品经营许可证</title>
    <!-- head 中 -->
    <link rel="stylesheet" href="#(basePath)/static/jquery-weui/css/weui.min.css">
    <link rel="stylesheet" href="#(basePath)/static/jquery-weui/css/jquery-weui.min.css">
    <link rel="stylesheet" href="#(basePath)/static/web/index/css/index.css">

    <style>
        .toptip {
            color: #999;
            font-size: 14px;
            padding-left: 10px;
        }

        .weui-cells__title_c {
            margin-top: .77em;

            width: 94%;
            margin-left: 3%;
            color: #000000;
            font-size: 18px;
            border-bottom: 1px solid #3cc51f;

        }
    </style>

</head>

<body>
<div class="page">
    <div class="page__hd">
        #include("/WEB-INF/main/top.html")
    </div>
    <div class="page__bd">

        <div class="weui-cells_sjz">
            <div class="weui-msg_c" style="">
                <div class="weui-msg__text-area_c" style="margin-bottom: 10px;padding-left: 40%">
                    <div class="weui-progress" style="width: 100%;">
                        <i class='#(sbxx.QYXX=="1"?"weui-icon-success-no-circle":"weui-icon-cancel")'></i>
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>
                    </div>
                </div>
                <div class="weui-msg__text-area_c">
                    <h2 class="weui-msg__title_c">企业信息</h2>
                </div>
            </div>
            <div class="weui-msg_c" style="">
                <div class="weui-msg__text-area_c" style="margin-bottom: 10px">

                    <div class="weui-progress" style="width: 100%;">
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>

                        <i class='#(sbxx.ZZXX=="1"?"weui-icon-success-no-circle":"weui-icon-cancel")'></i>
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>
                    </div>
                </div>
                <div class="weui-msg__text-area_c">
                    <h2 class="weui-msg__title_c">证照信息</h2>
                </div>
            </div>
            <div class="weui-msg_c" style="">
                <div class="weui-msg__text-area_c" style="margin-bottom: 10px">
                    <div class="weui-progress" style="width: 100%;">
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>
                        <i class='#(sbxx.FRXX=="1"?"weui-icon-success-no-circle":"weui-icon-cancel")'></i>
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>
                    </div>
                </div>
                <div class="weui-msg__text-area_c">
                    <h2 class="weui-msg__title_c">法人信息</h2>
                </div>
            </div>
            <div class="weui-msg_c" style="">
                <div class="weui-msg__text-area_c" style="margin-bottom: 10px">
                    <div class="weui-progress" style="width: 60%;">
                        <div class="weui-progress__bar">
                            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
                        </div>
                        <i class='#(sbxx.SBXX=="1"?"weui-icon-success-no-circle":"weui-icon-cancel")'></i>

                    </div>
                </div>
                <div class="weui-msg__text-area_c">
                    <h2 class="weui-msg__title_c">申报信息</h2>
                </div>
            </div>

        </div>

        <form id="qyxxForm" action="#(basePath)/wfw/wsbs/saveSbxx" method="post" data-role="form" data-fixed="true"
              next_url="#(basePath)/toSbpz">
            <input name="id" value="#(data.id??)" type="hidden">
            <input name="sblx" value="1" type="hidden">
            <div class="weui-cells__title_c">主体业态</div>
            <div class="weui-cells weui-cells_form">
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">业态类型</label></div>
                    <div class="weui-cell__bd">
                        <input class="weui-input" type="text" required placeholder="请选择主体业态" id="ztytlx" name="ztytlx">
                    </div>
                </div>
                <div class="weui-cell cuiui-cell_hide" for="ztytlx">
                    <!--<div class="weui-cell__hd"><label class="weui-label" ></label></div>-->
                    <div class="weui-cell__bd">
                        <input class="weui-input" type="text">
                    </div>
                </div>

                <div class="weui-cell weui-cell_switch">
                    <div class="weui-cell__bd">是否含网络经营<!--#(data.wljy)--></div>
                    <div class="weui-cell__ft">
                        <input hidden="hidden" id="sfwljy" name="sfwljy" type="radio" value="0" checked="checked">
                        <label for="switchWlyx" class="weui-switch-cp">
                            <input id="switchWlyx" class="weui-switch-cp__input" type="checkbox" name="wljy"
                                   value="#(data.wljy??=='1'?'1':'0')" #(data.wljy??=="1"?"checked":"")>
                            <div class="weui-switch-cp__box"></div>
                        </label>
                    </div>
                </div>
                <div class="weui-cell weui-cell_switch " for="switchWlyx">
                    <div class="weui-cell__bd">是否具有实体门店<!--#(data.stmd)--></div>
                    <div class="weui-cell__ft">
                        <input hidden="hidden" id="stmd" name="stmd" type="radio" value="0" checked="checked">
                        <label for="switchJystmd" class="weui-switch-cp">
                            <input id="switchJystmd" class="weui-switch-cp__input" type="checkbox" name="stmd"
                                   value="#(data.stmd??=='1'?'1':'0')" #(data.stmd??=="1"?"checked":"")>
                            <div class="weui-switch-cp__box"></div>
                        </label>
                    </div>
                </div>
                <div class="weui-cell weui-cell_select weui-cell_select-after " for="switchWlyx">
                    <div class="weui-cell__hd">
                        <label for="" class="weui-label">网络营销类型</label>
                    </div>
                    <div class="weui-cell__bd">
                        <select class="weui-select" name="wzlx">
                            <option value="0" #(data.wzlx??=="0"?"selected":"")>请选择网站类型</option>
                            <option value="1" #(data.wzlx??=="1"?"selected":"")>自建网站</option>
                            <option value="2" #(data.wzlx??=="2"?"selected":"")>第三方网站</option>
                        </select>
                    </div>
                </div>
                <div class="weui-cell " for="switchWlyx">
                    <div class="weui-cell__hd"><label class="weui-label">网站地址</label></div>
                    <div class="weui-cell__bd">
                        <input class="weui-input" name="wzdz" value="#(data.wzdz??)" type="text" placeholder="请输入网站地址">
                    </div>
                </div>
            </div>


            <div class="weui-cells__title_c">经营项目
                <div style="display:block;font-size: 16px;">
                    <label hidden="hidden" id="jyxmlx-error" style="color: red;" class="error" for="jyxmlx">这是必填字段</label>
                </div>
            </div>
            <div class="weui-cells weui-cells_form">
                <div class="weui-cell">
                    <!-- <div class="weui-cell__hd"><label class="weui-label">项目类型</label></div>-->
                    <div class="weui-cell__bd" style="display:block;">
                        <input class="weui-input" type="text" required placeholder="请选择经营项目" id="jyxmlx" name="jyxmlx">
                    </div>

                </div>
            </div>
            <div class="weui-cells__title_c">食品管理人员情况 <a href="javascript:;"
                                                         class="weui-btn weui-btn_mini weui-btn_default"></a></div>
            <div class="weui-cells weui-cells_form">
                <div class="weui-cell weui-cell_switch">
                    <div class="weui-cell__bd">引用法人信息</div>
                    <div class="weui-cell__ft">
                        <label for="switchJcfrxx" class="weui-switch-cp">
                            <input id="switchJcfrxx" class="weui-switch-cp__input" type="checkbox" name="isfrxx"
                                   value="#(data.isfrxx??=='1'?'1':'0')" #(data.isfrxx??=="1"?"checked":"")>
                            <div class="weui-switch-cp__box"></div>
                        </label>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="text"  name="sp_name" value="#(data.sp_name??)"
                               placeholder="请输入食品管理员名称" required>
                    </div>
                </div>
                <div class="weui-cell weui-cell_select weui-cell_select-after">
                    <div class="weui-cell__hd">
                        <label class="weui-label">性别</label>
                    </div>
                    <div class="weui-cell__bd">
                        <select class="weui-select" name="sp_sex">
                            <option value="0">请选择</option>
                            <option value="1" #(data.sp_sex??=="1"?"selected":"")>男</option>
                            <option value="2" #(data.sp_sex??=="2"?"selected":"")>女</option>
                            <!--  <option value="2">第三方网站</option>-->
                        </select>
                    </div>
                </div>
                <div class="weui-cell weui-cell_select weui-cell_select-after">
                    <div class="weui-cell__hd">
                        <label class="weui-label">证件类型</label>
                    </div>
                    <div class="weui-cell__bd">
                        <select class="weui-select" name="sp_idtype">
                            <option value="0">请选择</option>
                            <option value="1" #(data.sp_idtype??=="1"?"selected":"")>身份证</option>
                            <option value="2" #(data.sp_idtype??=="2"?"selected":"")>港澳通行证</option>
                            <!--  <option value="2">第三方网站</option>-->
                        </select>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">证件号</label></div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="text" name="sp_idcard" value="#(data.sp_idcard??)" placeholder="请输入证件号"
                               required>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">职务</label></div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="text" name="sp_post" value="#(data.sp_post??)" placeholder="请输入职务"
                               required>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">证书号</label></div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="text" name="sp_zsh" value="#(data.sp_zsh??)" placeholder="请输入食品安全管理员证书号"
                               >
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">联系电话</label></div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="text" name="sp_tel" value="#(data.sp_tel??)" placeholder="请输入联系电话"
                               required>
                    </div>
                </div>
                <div class="weui-cell">
                    <label class="cuiui-label ">备注</label>
                </div>
                <div class="cuiui-cell">

                    <div class="weui-cell__bd weui-cell__primary">
                        <textarea class="weui-textarea" placeholder="经营单位情况说明" rows="3" name="bz" >#(data.bz??)</textarea>
                        <div class="weui-textarea_counter"><span>0</span>/200</div>

                    </div>
                </div>
                <div style="padding: 15px;">
                    <a href="javascript:void(0)" class="weui-btn weui-btn_primary" onclick="lastStep('frxx')">上一步</a>
                    <button class="weui-btn weui-btn_primary" type="submit">提交申请</button>
                </div>
                <br> <br>
        </form>
    </div>
    <div class="page__footer">

        #include("/WEB-INF/main/footer.html")
    </div>
</div>
<script src="#(basePath)/static/web/index/js/index.js"></script>
<script src="#(basePath)/static/jquery-weui/js/cui-select.js"></script>
</body>
<script>
    function initSqbData() {
        console.log(1);
        $.getJSON("#(basePath)/static/resources/sqbData.json?v=1.1", function (result) {
            console.log(result);
            sqbData = result;
            initData(result, "ztytlx");
            initData(result, "jyxmlx");
        });
    }
    function init() {
        initHide();
        initSqbData();
    }
    init();
    $(function () {
        $("#switchWlyx").bind("click", function () {
            if($("#sfwljy").val()=="0"){
                $("#sfwljy").val("1");
                console.log("当前状态："+$("#sfwljy").val());
            }else{
                $("#sfwljy").val("0");
                console.log("当前状态："+$("#sfwljy").val());
            }
        });
    });
    $(function () {
        $("#switchJystmd").bind("click", function () {
            if($("#stmd").val()=="0"){
                $("#stmd").val("1");
                console.log("当前状态："+$("#stmd").val());
            }else{
                $("#stmd").val("0");
                console.log("当前状态："+$("#stmd").val());
            }
        });
    });
    $("#switchJcfrxx").click(function () {
        if($(this).val()=="1"){
            $(this).val(0);
        }else{
            $(this).val(1);
            $.getJSON("#(basePath)/wfw/wsbs/findFrxx", function (data) {
                console.log(data);
                $("input[name='sp_name']").val(data.NAME);
                $("select[name='sp_sex']").val(data.SEX);
                $("select[name='sp_idtype']").val(data.IDTYPE);
                $("input[name='sp_idcard']").val(data.ZJH);
                $("input[name='sp_post']").val(data.POST);
                $("input[name='sp_tel']").val(data.PHONE);
            });
        }
    });
</script>
</html>